import {
  axios
} from '@/utils/request'

// 查询表格数据
export function jbdLeadList(parameter) {
  return axios({
    url: 'jbd/jbdLeads/list',
    method: 'GET',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

// 通过id获取详情信息
export function queryById(parameter) {
  return axios({
    url: 'jbd/jbdLeads/queryById',
    method: 'GET',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

// 
export function queryAll() {
  return axios({
    url: 'jbd/jbdService/queryAll',
    method: 'GET',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

 //订单详情
 export function  getDepartSelect(parameter){
  return axios({
    url: 'sys/sysDepart/queryMyDeptTreeList',
    method: 'GET',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

//订单详情  
export function  getRoleSelect(parameter){
  return axios({
    url: 'sys/user/departUserList',
    method: 'GET',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

//订单详情
export function  leadsDistribution(parameter){
  return axios({
    url: 'jbd/jbdLeads/distribution',
    method: 'PUT',
    data: parameter,
    headers: {
      'Content-Type': 'application/json',
    }
  })
}

// 线索分配按钮 
// 跟进
export function  followUp(parameter){
  return axios({
    url: 'jbd/jbdLeads/followUp',
    method: 'PUT',
    data: parameter,
    headers: {
      'Content-Type': 'application/json',
    }
  })
}

// 成单和流单
export function  orderFormOrflow(parameter){
  return axios({
    url: 'jbd/jbdLeads/orderFormOrflow',
    method: 'PUT',
    data: parameter,
    headers: {
      'Content-Type': 'application/json',
    }
  })
}

// 付款回执
export function  paymentReceipt(parameter){
  return axios({
    url: 'jbd/jbdLeads/paymentReceipt',
    method: 'PUT',
    data: parameter,
    headers: {
      'Content-Type': 'application/json',
    }
  })
}

// 获取客户标签列表
export function DictItemList(parameter) {
  return axios({
    url: 'sys/dict/getDictItems/leadsTag',
    method: 'GET',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}

export function JbdLeadsAdd(parameter) {
  return axios({
    url: 'jbd/jbdLeads/add',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json',
    }
  })
}

// 线索导出
export function JbdLeadsExportXls(parameter) {
  return axios({
    url: 'jbd/jbdLeads/exportXls',
    method: 'get',
    params: parameter,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    }
  })
}


